/*
 *  Copyright (C) 2011 Hatsites <Hatsites_AT_gmail.com>
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

package org.myorg.ctm.etk.dtb.structure.dtb.tbl;

import org.myorg.ctm.etk.dtb.structure.dtb.tbl.TblClt;
import org.myorg.shr.dtb.structure.db.table.TblAbs;
import org.myorg.shr.dtb.structure.dtb.tbl.fld.*;

/**
 *
 * @author Hatsites
 *
 * email: Hatsites_AT_gmail.com
 * ... please remove "_AT_" from the above string to get the right email address
 *
 */

public class TblAnm extends TblAbs{

    private TblAnm(){
        super("animal");
        super.add(STR_ID,        FldTypVarChar.s_getInstance(), 20, _strId_);
        super.add(STR_IDT_NOM,   FldTypVarChar.s_getInstance(), 20, _strIdentiteNom_);
        super.add(STR_IDT_SEXE,  FldTypChar.s_getInstance(), 1, _strIdentiteSexe_);
        super.add(STR_PRP,       FldTypRefId.s_getInstance(), TblClt.s_getInstance(), TblClt.STR_ID, _strIdProprietaire_);
        super.add(STR_CASTRE,    FldTypChar.s_getInstance(), 1, _strCastre_);
        super.add(STR_SPECIE,    FldTypVarChar.s_getInstance(), 20, _strEspece_);
        super.add(STR_RACE,      FldTypVarChar.s_getInstance(), 20, _strRace_);
        super.add(STR_IDT_BIRTH, FldTypDate.s_getInstance(), 20, _strIdentiteDateNaissance_);
        super.add(STR_IDT_DEATH, FldTypDate.s_getInstance(), 20, _strIdentiteDateMort_);

    }

    public static synchronized TblAnm s_getInstance() {
        if (_INSTANCE == null) {
                _INSTANCE = new TblAnm();
        }
        return _INSTANCE;
    }

    final public static String STR_ID = "id";
    final public static String STR_IDT_NOM = "nom";
    final public static String STR_IDT_SEXE = "sexe";
    final public static String STR_PRP = "proprietaire";
    final public static String STR_CASTRE = "castre";
    final public static String STR_SPECIE = "espece";
    final public static String STR_RACE = "race";
    final public static String STR_IDT_BIRTH = "dateNaissance";
    final public static String STR_IDT_DEATH = "dateMort";


    private static TblAnm _INSTANCE = null;
    private String _strId_;
    private String _strIdentiteNom_;
    private String _strIdentiteSexe_;
    private String _strIdProprietaire_;
    private String _strCastre_;
    private String _strEspece_;
    private String _strRace_;
    private String _strIdentiteDateNaissance_;
    private String _strIdentiteDateMort_;
}
